Skip to content

Commit

Permalink
Merge pull request #165 from screwdriver-cd/createTime
Browse files Browse the repository at this point in the history
fix: move build createTime closer to datastore save
  • Loading branch information
minzcmu authored May 24, 2017
2 parents 6f5c835 + 7cf712f commit f550af7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/buildFactory.js
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,6 @@ class BuildFactory extends BaseFactory {
const modelConfig = config;

modelConfig.cause = `Started by user ${config.username}`;
modelConfig.createTime = (new Date(number)).toISOString();
modelConfig.number = number;
modelConfig.status = 'QUEUED';

Expand Down Expand Up @@ -169,6 +168,7 @@ class BuildFactory extends BaseFactory {
modelConfig.steps = setup.concat(modelConfig.steps, teardown);
// Launcher is hardcoded to do some business in sd-setup-launcher
modelConfig.steps.unshift({ name: 'sd-setup-launcher' });
modelConfig.createTime = (new Date(number)).toISOString();

return super.create(modelConfig);
});
Expand Down

0 comments on commit f550af7

Please sign in to comment.