<commit_before><commit_msg>Non transactional class for managing the state of a job and its tasks.<commit_after>package com.breakersoft.plow.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import com.breakersoft.plow.Job;

@Component
public class JobStateManager {

    @Autowired
    JobService jobService;

    @Autowired
    RndProcessManager processManager;

    public boolean killJob(Job job, String reason) {
        final boolean killResult = jobService.shutdown(job);
        if (killResult) {
            processManager.killProcs(job, reason);
        }
        return killResult;
    }
}
{'fraction_non_alphanumeric': 0.07738095238095238, 'fraction_numerical': 0.0, 'mean_word_length': 3.673611111111111, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3873744', 'n_tokens_mistral': 184, 'n_tokens_neox': 186, 'n_words': 46}