Skip to content

Commit

Permalink
minor fix.
Browse files Browse the repository at this point in the history
  • Loading branch information
lushu committed Dec 4, 2023
1 parent 929846a commit 54664b9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@google-cloud/data-tasks-coordinator",
"version": "1.9.0",
"version": "1.9.1",
"description": "A data task coordinator based on Cloud Functions",
"author": "Google Inc.",
"license": "Apache-2.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ class Sentinel {
const partitionDay = getDatePartition(file.name);
return Promise.all(taskIds.map((taskId) => {
this.logger.debug(`Trigger Load task: ${taskId}.`);
const parameters = JSON.stringify({ file, partitionDay }); å
const parameters = JSON.stringify({ file, partitionDay });
return this.taskManager.sendTaskMessage(parameters, { taskId });
}));
} catch (error) {
Expand All @@ -145,7 +145,7 @@ class Sentinel {
* @private
*/
async getTaskIdByFile_(fileName) {
const regex = /task\[([\w-]*)]/i;
const regex = /task[\[|{}]([\w-]*)[\]|}]/i;
const task = fileName.match(regex);
if (task) return [task[1]];
const matchesFileNamePattern = ({ source = {} }) => {
Expand Down Expand Up @@ -670,7 +670,7 @@ const getSentinel = async (namespace, database) => {
validatedStorageTrigger,
};
console.log(
`Init Sentinel for namespace[${namespace}], Datasource[${database}]`);
`Init Sentinel for namespace[${namespace}], Datasource[${database.id}]`);
return new Sentinel(options);
};

Expand Down

0 comments on commit 54664b9

Please sign in to comment.