Show
Ignore:
Timestamp:
03/17/08 04:06:17 (6 years ago)
Author:
Theo Schlossnagle <jesus@omniti.com>
git-committer:
Theo Schlossnagle <jesus@omniti.com> 1205726777 +0000
git-parent:

[065b0349f122c8e5f44538bed5636ea8b49362b6]

git-author:
Theo Schlossnagle <jesus@omniti.com> 1205726777 +0000
Message:

check code consolidation. allow modules to be more terse and add convenience functions to make writing completely asynch checkers much easier. (add a postgres proof-of-concept asynch checker

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • src/noit_check_tools.h

    r9a6060c r4b96846  
    2525                           struct timeval *now, dispatch_func_t recur); 
    2626 
     27API_EXPORT(void) 
     28  noit_check_run_full_asynch(noit_check_t *check, eventer_func_t callback); 
     29 
     30#define INITIATE_CHECK(func, self, check) do { \ 
     31  if(once) { \ 
     32    func(self, check); \ 
     33  } \ 
     34  else if(!check->fire_event) { \ 
     35    struct timeval epoch = { 0L, 0L }; \ 
     36    noit_check_fake_last_check(check, &epoch, NULL); \ 
     37    noit_check_schedule_next(self, &epoch, check, NULL, func); \ 
     38  } \ 
     39} while(0) 
     40 
     41API_EXPORT(void) 
     42  noit_check_make_attrs(noit_check_t *check, noit_hash_table *attrs); 
     43API_EXPORT(void) 
     44  noit_check_release_attrs(noit_hash_table *attrs); 
     45 
     46 
    2747#endif 
    2848