Skip to content

Commit d58ec0f

Browse files
committed
fix
Change-Id: I60da50be34cdf38e61ad4f97019a90c261a97725
1 parent 9a5fad0 commit d58ec0f

File tree

11 files changed

+176
-141
lines changed

11 files changed

+176
-141
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
.DS_Store
1+
.DS_Store
2+
replacements.txt

README.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,12 @@ The application does not use any database. Instead all data is kept in Google Sp
172172
There are two type of environment in GAE: standard and flexible. See https://cloud.google.com/appengine/docs/the-appengine-environments
173173
As flexibile environment doesn't provide Free Tier we use standard. But you can manually change the environemnt in your `app.yaml`. Standard environment allows to scale down to 0 running instances when the application is not in use.
174174

175-
There are several types of scaling in standard environment. By default automatic scaling is used. Different scaling type have [different characterictics](https://cloud.google.com/appengine/docs/standard/nodejs/how-instances-are-managed#scaling_types). For this solution the most important one is *request timeout*. During main execution there will lots of calls to DV360 API (to enable/disable IO/LI) and the API is quite slow. So one execution can last quite long.
175+
There are several types of scaling in standard environment. By default automatic scaling is used.
176+
Different scaling type have [different characterictics](https://cloud.google.com/appengine/docs/standard/nodejs/how-instances-are-managed#scaling_types).
177+
For this solution the most important one is *request timeout*.
178+
During main execution there will lots of calls to DV360 API (to enable/disable IO/LI) and the API is quite slow.
179+
So one execution can last quite long.
180+
176181
Request timeouts are following:
177182
* Automatic scaling : 10 minutes
178183
* Basic/manual scaling: 24 hours

backend/.env.example

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
OPENWEATHER_API_KEY=your_api_key_here

backend/.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@ src/test/credentials.json
1010
.DS_Store
1111
app.yaml
1212
app.yaml.original
13-
mailer.json
13+
mailer.json.env

backend/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
"@js-joda/core": "^4.0.0",
3636
"csv": "^5.5.3",
3737
"csv-parse": "^4.16.3",
38+
"dotenv": "^17.2.3",
3839
"express": "^4.17.1",
3940
"gaxios": "^4.3.2",
4041
"google-auth-library": "^9.8.0",

backend/src/app/dv360-facade.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ export default class DV360Facade {
221221
"filterType": "FILTER_TYPE_CAMPAIGN_ID",
222222
"filterIds": [campaignId]
223223
},
224-
//version: "SDF_VERSION_5_3" //SDF_VERSION_UNSPECIFIED
224+
//version: "SDF_VERSION_7" - NOTE: we're not hard-coding and configure SDF version, instead we rely on what is set in Advertiser's settings
225225
},
226226
})).data;
227227
} catch(e) {

backend/src/index.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16+
import * as dotenv from "dotenv";
17+
dotenv.config();
18+
1619
import { PORT, IS_GAE } from './env';
1720
import argv from './argv';
1821
import { google } from 'googleapis';

0 commit comments

Comments
 (0)