Skip to content

Refactor: wording #21

@josecelano

Description

@josecelano

In the original repo, we started a discussion about wording:

  1. Commit message subject
  2. Code: message names

IMPORTANT: allowing more than one job is still not implemented. We can implement this issue without adding the job.{#JOB_POSITION}/{#PENDING_JOBS}: part of the subject.

Commit subject

New job:

📝🈺: {QUEUE_NAME}: job.{JOB_NUMBER}
📝🈺: update_artwork: job.24

Start job:

📝👔: {QUEUE_NAME}: job.{#JOB_POSITION}/{#PENDING_JOBS}: job.ref.{JOB_CREATION_COMMIT_HASH}
📝👔: update_artwork: job.15/30: job.ref.1e31b549c630f806961a291b4e3d4a1471f37490

Finish job

📝👕: {QUEUE_NAME}: job.{#JOB_POSITION}/{PENDING_JOBS}: job.ref.{JOB_CREATION_COMMIT_HASH}
📝👕: update_artwork: job.15/30: job.ref.1e31b549c630f806961a291b4e3d4a1471f37490

Variables:

  • JOB_NUMBER is a job (not message) auto-incremental ID.
  • QUEUE_NAME is the name of the queue. Special characters or white spaces are replaced by -. Max. length 30 after formatting.
  • JOB_CREATION_COMMIT_HASH is the has of the commit where the job was created.
  • #PENDING_JOBS is the number of not finished jobs in the queue.
  • #JOB_POSITION in the not finished jobs.

Examples:

Job 24 was created:

📝🈺: update_artwork: job.24

The job created in the commit 1e31b549c630f806961a291b4e3d4a1471f37490 (24) has started and it's currently the 15th job in the 30 not finished jobs.

📝👔: update_artwork: job.15/30: job.ref.1e31b549c630f806961a291b4e3d4a1471f37490

The previous jobs has finished:

📝👕: update_artwork: job.15/30: job.ref.1e31b549c630f806961a291b4e3d4a1471f37490

Notes:

  • #JOB_POSITION and #PENDING_JOBS (job.15/30 in the example) are always the same for the same job because the commits are merged at the same time.

Message names

In the source code we have two types of messages:

  • CreateJobMessage
  • MarkJobAsDoneMessage

We have to rename them to:

  • NewJobMessage
  • JobFinishedMessage

We will add the new message JobStartedMessage in a different issue.

please @da2ce7 could you review this issue? especially the #PENDING_JOBS and #JOB_POSITION variables. I do not know if I got them right.

cc @yeraydavidrodriguez

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions