Displaying 13 results from an estimated 13 matches for "delete_cache".
2008 Apr 16
2
QUICK QUESTION: Run a Ruby File inside of Model
...I''m trying to run a ruby file in lib from inside of a model. How can I
run a ruby file from inside of a model?
In this example, Thing.rb is my model. I''m trying to run do_update.rb.
How can I call this from inside of Thing.rb?
Thing.rb
**********************
def update_things delete_cache
things = Thing.find(:all, :conditions => "updated = false")
### Run an updater in "lib/updater/do_update.rb"
#### What goes on this line? # ruby script/runner do_update.rb
end
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--...
2015 Nov 11
0
[PATCH] builder: Make the interface between cmdline.ml and builder.ml explicit.
...match cmdline.output with
| None -> ""
| Some output -> sprintf " --output %s" (quote output))
- (quote arg) in
+ (quote cmdline.arg) in
if verbose () then printf "%s\n%!" cmd;
exit (Sys.command cmd)
| `Delete_cache -> (* --delete-cache *)
- (match cache with
+ (match cmdline.cache with
| Some cachedir ->
message (f_"Deleting: %s") cachedir;
Cache.clean_cachedir cachedir;
@@ -129,16 +125,16 @@ let main () =
(* Check that gpg is installed....
2006 Feb 28
0
Rolled my own alternative to trigger function with OLD/NEW
...et_old(''active'', self.active)
write_attribute(:active, value)
end
def after_update
if !get_old(''active'') and self.active
Notifier::deliver_item_approved(self)
end
if get_old(''active'') != self.active
Maintenance.delete_cache(''...'') # I wrote my own alternative to
expire_fragment that actually works in models. Grumble...
end
end
protected
def get_old(value)
@old[value] unless @old.nil?
end
def set_old(key, value)
(@old ||= {})[key] = value
end
end
Feel free to expound on i...
2014 Mar 10
2
[PATCH] builder: complete architecture handling
...der.download ~prog downloader ~template ~progress_bar file_uri in
diff --git a/builder/cmdline.ml b/builder/cmdline.ml
index 6e8bfd8..0dd0ad2 100644
--- a/builder/cmdline.ml
+++ b/builder/cmdline.ml
@@ -44,6 +44,9 @@ let parse_cmdline () =
let print_cache_mode () = mode := `Print_cache in
let delete_cache_mode () = mode := `Delete_cache in
+ let arch = ref "" in
+ let allow_foreign_arch_ops = ref false in
+
let attach = ref [] in
let attach_format = ref None in
let set_attach_format = function
@@ -221,6 +224,9 @@ let parse_cmdline () =
let ditto = " -\"-" i...
2014 Mar 11
4
Re: [PATCH] builder: complete architecture handling
...--git a/builder/cmdline.ml b/builder/cmdline.ml
> > index 6e8bfd8..0dd0ad2 100644
> > --- a/builder/cmdline.ml
> > +++ b/builder/cmdline.ml
> > @@ -44,6 +44,9 @@ let parse_cmdline () =
> >
> > let print_cache_mode () = mode := `Print_cache in
> > let delete_cache_mode () = mode := `Delete_cache in
> >
> > + let arch = ref "" in
> > + let allow_foreign_arch_ops = ref false in
>
> Can't we detect allow_foreign_arch_ops automatically?
>
> For normal uses of libguestfs, the only case that matters is a 32 bit
>...
2016 May 23
0
[PATCH 5/5] mllib: add a new run_command helper
...t; []
+ | Some format -> [ "--format"; format ]) @
+ (match cmdline.output with
+ | None -> []
+ | Some output -> [ "--output"; output ]) @
+ [ "--add"; cmdline.arg ] in
+ exit (run_command (Array.of_list cmd))
| `Delete_cache -> (* --delete-cache *)
(match cmdline.cache with
@@ -550,14 +549,14 @@ let main () =
let ifile = List.assoc `Filename itags in
let ofile = List.assoc `Filename otags in
message (f_"Copying");
- let cmd = sprintf "cp %s %s" (q...
2016 May 23
7
[PATCH 1/5] mllib: make external_command echo the command executed
Add an optional parameter to disable this behaviour, so the Curl module
in v2v won't print user-sensible data (like passwords).
---
builder/checksums.ml | 1 -
builder/downloader.ml | 1 -
builder/sigchecker.ml | 1 -
mllib/common_utils.ml | 4 +++-
mllib/common_utils.mli | 7 +++++--
v2v/curl.ml | 2 +-
6 files changed, 9 insertions(+), 7 deletions(-)
diff --git
2015 Jun 11
2
[PATCH] (Almost) new tool: virt-get-kernel
...rmat %s" (quote format))
+ (match output with
+ | None -> ""
+ | Some output -> sprintf " --output %s" (quote output))
+ (quote arg) in
+ if verbose () then printf "%s\n%!" cmd;
+ exit (Sys.command cmd)
| `Delete_cache -> (* --delete-cache *)
(match cache with
diff --git a/builder/get_kernel.ml b/builder/get_kernel.ml
deleted file mode 100644
index 5cea647..0000000
--- a/builder/get_kernel.ml
+++ /dev/null
@@ -1,92 +0,0 @@
-(* virt-builder
- * Copyright (C) 2013 Red Hat Inc.
- *
- * Thi...
2016 May 22
0
[PATCH 2/2] ocaml tools: Use a common debug function.
...7 @@ let main () =
| None -> ""
| Some output -> sprintf " --output %s" (quote output))
(quote cmdline.arg) in
- if verbose () then printf "%s\n%!" cmd;
+ debug "%s" cmd;
exit (Sys.command cmd)
| `Delete_cache -> (* --delete-cache *)
@@ -552,14 +552,14 @@ let main () =
let ofile = List.assoc `Filename otags in
message (f_"Copying");
let cmd = sprintf "cp %s %s" (quote ifile) (quote ofile) in
- if verbose () then printf "%s\n%!" c...
2016 May 22
4
ocaml tools: Use a common debug function.
Add a Common_utils.debug function for printing messages
only when in verbose mode.
Rich.
2015 May 15
0
[PATCH 3/4] ocaml tools: Use global variables to store trace (-x) and verbose (-v) flags.
...nt_newline ();
@@ -95,7 +94,7 @@ let main () =
let mode =
match mode with
| `Get_kernel -> (* --get-kernel is really a different program ... *)
- Get_kernel.get_kernel ~trace ~verbose ?format ?output arg;
+ Get_kernel.get_kernel ?format ?output arg;
exit 0
| `Delete_cache -> (* --delete-cache *)
@@ -119,7 +118,7 @@ let main () =
if Sys.command cmd <> 0 then (
if check_signature then
error (f_"gpg is not installed (or does not work)\nYou should install gpg, or use --gpg option, or use --no-check-signature.")
- els...
2015 May 15
5
[PATCH 0/4] Only tell people to use -v -x when reporting bugs if they're not using those flags.
.. and a lot of refactoring.
https://bugzilla.redhat.com/show_bug.cgi?id=1167623
Rich.
2015 May 15
6
[PATCH v2 0/4] Only tell people to use -v -x when reporting bugs if they're not using those flags.
https://bugzilla.redhat.com/show_bug.cgi?id=1167623