summaryrefslogtreecommitdiffhomepage
path: root/src/nxt_job_file_cache.c
diff options
context:
space:
mode:
authorKonstantin Pavlov <thresh@nginx.com>2023-05-10 10:29:16 -0700
committerKonstantin Pavlov <thresh@nginx.com>2023-05-10 10:29:16 -0700
commit69235c513277c64b513447d9b92c3c03d616f577 (patch)
tree0780c92ba28d92b547c85ea0bee5e3040e14dee2 /src/nxt_job_file_cache.c
parentb9bc222021e77bbdfb12576b3e315b962cf6b399 (diff)
parentfaf97dc06058de1c929af33a68adb34d3932b374 (diff)
downloadunit-1.30.0-1.tar.gz
unit-1.30.0-1.tar.bz2
Merged with the default branch.1.30.0-1
Diffstat (limited to 'src/nxt_job_file_cache.c')
-rw-r--r--src/nxt_job_file_cache.c42
1 files changed, 0 insertions, 42 deletions
diff --git a/src/nxt_job_file_cache.c b/src/nxt_job_file_cache.c
deleted file mode 100644
index 680d0665..00000000
--- a/src/nxt_job_file_cache.c
+++ /dev/null
@@ -1,42 +0,0 @@
-
-/*
- * Copyright (C) Igor Sysoev
- * Copyright (C) NGINX, Inc.
- */
-
-
-#include <nxt_main.h>
-
-
-typedef struct {
- nxt_cache_node_t node;
- nxt_file_t file;
-} nxt_file_cache_t;
-
-
-void
-nxt_job_file_cache_read(nxt_cache_t *cache, nxt_job_file_t *jbf)
-{
- nxt_file_cache_node_t *node;
-
- node = nxt_cache_find(cache);
-
- if (node != NULL) {
-
- if (node->fd != -1) {
- nxt_job_return(&jbf->job, jbf->ready_handler);
- return;
- }
-
- if (node->error != 0) {
- nxt_job_return(&jbf->job, jbf->error_handler);
- return;
- }
-
- if (node->accessed + 60 > nxt_thread_time()) {
- jbf->job.thread_pool = NULL;
- }
- }
-
- nxt_job_file_read(jbf);
-}