HangfireIO / HangfireIO/Hangfire

Play pause stop cancel functionality manual

Open
#866 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
C#
Stars
10.1k
Forks
1.8k
Avg merge
1h 19m
Merged PRs (30d)
1

Description

I want to add Play, Pause, Resume and Cancel functionality using hangfire library.

I had maintained one static list which has following columns
parentJobID, ParentJobProgressStatus = false(default), childJobId, childJobProgressStatus = false (default)

For Play functionality:-

1). I will enqueue the job and will get primaryJobId
2). Then I will call BackgroundJob.ContinueWith(primaryJobId, ()=> RemovedSuccessJobs(primaryJobId));
so that whenever primaryJobId gets completed successfully, primaryJobId will be removed from the shared list.
3). Then i will create an item with primaryJobID, primaryJobStatus = false, childJobID, childJobStatus = false and add it into list.

4). Called Thread.Sleep(3000):- just increase the program processing time.

For Cancel & Pause:-

I am removing all the jobs by using static list's primaryJobID's and childJobID's.

For Resume:-
i will again follow at the step which i did for enqueuing jobs.

Now, my questions are

1). I am not able to use, since it show HttpContext == null inside background process. Can anyone give me suggestions why this happens and what is the solution for it.?

Please see attached file for reference.
![one](https://cloud.githubusercontent.com/assets/21169800/24943070/609a29fc-1f72-11e7-86a2-63a34bd4cdb8.png)

Contributor guide

Open the contributing guide

Research direction

Start by reviewing the background-job entry points mentioned in the issue, including BackgroundJob.ContinueWith, the static job list, and the HttpContext access. Determine the intended scope for play, pause, resume, and cancel behavior, then verify the design against Hangfire's background-processing model; the issue does not identify a source file or test that defines completion.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
backend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
15/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.