Skip to content

Commit

Permalink
Add option to specify group ID
Browse files Browse the repository at this point in the history
  • Loading branch information
jakepruitt committed Jun 12, 2018
1 parent 3a42dbb commit 6f5a80b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/template.js
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,8 @@ module.exports = (options = {}) => {
[
{ Name: 'WorkTopic', Value: cf.ref(prefixed('Topic')) },
{ Name: 'QueueUrl', Value: cf.ref(prefixed('Queue')) },
{ Name: 'Volumes', Value: mountPoints.map((m) => m.ContainerPath).join(',') }
{ Name: 'Volumes', Value: mountPoints.map((m) => m.ContainerPath).join(',') },
{ Name: 'GroupID', Value: options.gid || '' }
]
);
};
Expand Down
2 changes: 2 additions & 0 deletions lib/worker.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@ class Worker {
// An arbitrarily chosen UID of a non-existent user
uid: 200
};
// If group id is specified, add the group id
if (process.env.GroupID) options.gid = Number(process.env.GroupID);

try {
const results = await child(this.command, options, this.logger);
Expand Down

0 comments on commit 6f5a80b

Please sign in to comment.